package com.innovatio.validator.annotations;

import com.innovatio.utils.general.CommonsUtils;
import com.innovatio.validator.handlers.ValidateExpresionHandler;

import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * This code is property of Innovatio Software Solutions, Inc.
 * User: Edxe
 * Date: Jul 8, 2009
 * Time: 2:54:11 AM
 */
@Retention(value = RetentionPolicy.RUNTIME)
@Target(java.lang.annotation.ElementType.FIELD)
@Validation(ValidateExpresionHandler.class)
public @interface ValidateExpresion {
    String expresion();

    /**
     * the values for the declared vars on the expresion,
     * an example declaretion could be givin an example
     * expresion (a + b == 1) the varValue sould be a:1,b:2
     */
    String varValues() default CommonsUtils.EMPTY;
    String i18nBundleKey() default "validation_expresion";
}
